<!DOCTYPE html 
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <head>
        <title>Videos</title>
        <link href="../resources/css/index.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div class="header">
            <table width="100%" >
                <tr>
                    <th width="52" scope="col" style="background-image:none;"><img src="../resources/images/header-leaft.png" width="52" height="91" align="right" /></th>
                    <th width="1" scope="col">&nbsp;</th>
                    <th width="119" scope="col"><img src="../resources/images/logo.png" width="258" height="75"/></th>
                    <th width="300" scope="col" align="right">
                <h:form>
                    <c:if test="#{user.isAuthenticated() == 0}">
                        <font face="Tahoma" color="#FFFFFF" size="-1">Login:</font>
                        <h:inputText value="#{user.login}" />
                        <h:commandButton value="login" action="#{user.login()}"/>
                        <br/>
                        <h:message for="#{user.login()}"/>
                        <font face="Tahoma" color="#FFFFFF" size="-1">Password:</font>
                        <h:inputSecret value="#{user.password}" />
                        <h:commandButton value="Register" action="#" />
                        <br/>
                    </c:if>
                    <c:if test="#{user.isAuthenticated() == 1}">
                        <h:outputText value="Hi, " style="color: white" /> 
                        <h:outputText value="ADMIN" style="color: white"
                                      rendered="#{user.isUserAdmin()}" />
                        <h:outputText value="#{user.getUserLogin()}" style="color: white"
                                      rendered="#{user.isSimpleUser()}" />
                        <br />
                        <h:commandLink action="#{user.logout()}" value="Logout" style="color: white" rendered="#{user.isAuthenticated() == 1}"/>
                    </c:if>     
                </h:form>
                </th>
                <th width="5%" scope="col">&nbsp;</th>
                </tr>
            </table>
        </div>
        <h2>VIDEOS</h2>

        <p><a href="../index.xhtml" style="color: white; ">Return to index</a></p>

    </body>
</html>